using System;
using System.Collections.Generic;
using System.Text;

namespace Xeml.Sampling
{
    /// <summary>
    /// A event argument class for collecting authentication information.
    /// </summary>
    public class AuthenticationRequestEventArgs : EventArgs
    {
        #region Fields
        private string _userName;
        private string _password;
        private bool _cancel;
        private bool _persistCredentials;

      

        #endregion

        #region Properties

        /// <summary>
        /// Indicates whether or not the supplied credentials should be saved.
        /// </summary>
        public bool PersistCredentials
        {
            get { return _persistCredentials; }
            set { _persistCredentials = value; }
        }


        /// <summary>
        /// Indicates whether or not the current request should be canceled.
        /// </summary>
        public bool Cancel
        {
            get { return _cancel; }
            set { _cancel = value; }
        }



        /// <summary>
        /// The requested password.
        /// </summary>
        public string Password
        {
            get { return _password; }
            set { this._password = value; }
        }

        /// <summary>
        /// The requested username.
        /// </summary>
        public string UserName
        {
            get { return _userName; }
            set { this._userName = value; }
        } 
        #endregion

        #region Constructors

        public AuthenticationRequestEventArgs()
        {
         
        } 

		/// <summary>
        /// A parameterized constructor to predefine the user name.
        /// </summary>
        /// <param name="userName"></param>
        public AuthenticationRequestEventArgs(string userName)
        {
            this._userName = userName;
        }

        public AuthenticationRequestEventArgs(string userName, string passwd) : this(userName)
        {
            this._password = passwd;
        } 
	#endregion

    }
}